
#ifndef __PHOTO_VIEW_THUMBNAIL_MANAGER_H__
#define __PHOTO_VIEW_THUMBNAIL_MANAGER_H__
#include <Windows.h>
#include <vector>
#include "CommonUtility.h"
#include "imaging.h"
struct SubThreadData
{
	DWORD parentThreadID;
	DWORD subThreadID;
	HANDLE hSubThread;
	IImagingFactory *pImagingFactory;
	StdString pCurrentDirectory;
	StdString pParentDirectory;
	int currDirectoryImageFileNum;
	int currDirectoryHasGenThumNum;
	int currDireHasGenPageNum;
	int directoryIndex;
	FileStats currentDirectoryFileList;
};
enum PhotoView_StartupCmd
{
	PV_NORMALE_STARTUP = 0,
	PV_BROWSE_STARTUP,
	PV_SELECT_STARTUP,
	PV_OPEN_STARTUP,
	PV_WALLPAPER_STARTUP,
	PV_SELECT_FROM_FILEBROWSER,
};
class ThumbnailManager
{
public:
	ThumbnailManager();
	virtual ~ThumbnailManager();
    static void GenThumbFilePath( const StdString& picFilePath, StdString &thumbFilePath );
    static void GenPicFilePath( const StdString& thumbFilePath, StdString &picFilePath );
	static BOOL SetThumbDBRootPath( const TCHAR *thumbDBRootPath );
	static BOOL RefreshThumbDB( const TCHAR *picDictory, int *pNumThumbRefreshed = NULL );
	static int GetThumbNum( const TCHAR *picDictory );
	static HBITMAP GetThumbnail( const TCHAR *picFilePath, int thumbWidth = -1, int thumbHeight = -1 );
	static BOOL DelThumbnail( const TCHAR *picFilePath );
	static int UpdateThumbnail( const TCHAR *picFilePath );
	static BOOL RenameThumbnail( const TCHAR *oldPicFilePath, const TCHAR *newPicFilePath );

private:
// 	ThumbnailManager( const ThumbnailManager &rhs );
// 	ThumbnailManager& operator =( const ThumbnailManager& rhs );

private:	
	static const int m_defaultThumbWidth;
	static const int m_defaultThumbHeight;
	
};




#endif
